home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
dev
/
amos
/
ldosv25d.lha
/
ldos_demo
/
examples
/
ldos
/
Dev.AMOS
/
Dev.amosSourceCode
Wrap
AMOS Source Code
|
1992-01-18
|
1KB
|
60 lines
' This demo uses the trackdisk.device to read directly from the disk.
' The destinationbuffer MUST be placed in CHIP-mem (blitter decoding)
'
' The program reads only 1 block from 1 side of the disk, thus the
' speedy loading :-)
'
' The numbers printed on the screen are the number of bytes read,
' 1 block=512 bytes.
'
' A simple "meeter" is used to display how much that is left to read.
'
Reserve As Chip Work 10,1024
Proc SETUP
Rem NOTE CHIP!!
'Read one block from each track on disk (one side only)
'
A= Extension_10_01AE("trackdisk.device",0,0)
If A<>0
Print "Failed to open device"
End
End If
'A=0 if everything worked,
BEG=0
_END=79
_TOT#=_END-BEG
Locate 0,15 : Print "Status :"
Home
Curs Off
For I=BEG To _END
Proc DISP[I,_END,_TOT#]
Print Extension_10_01DA(2,Start(10),512,I*22*512);" ";
ERR= Extension_10_023A
' Syntax is Command,DEST/SOURCE,Length,Offset
' All Lengths/offsets MUST be a multiple of 512
X=X Curs
Y=Y Curs
' See docs for error codes. Try running this demo without a disk in df0:
Locate 9,15 : Print ERR
Locate X,Y
Next I
'
'Turn off motor else the drive won't stop
A= Extension_10_01DA(9,0,0,0)
Extension_10_01C6
'<<Close device>>
'
Procedure DISP[A,E,NUM#]
SCALE#=80/NUM#
POS=80-(E-A)*SCALE#
Dec POS
If E-A=0
POS=79
End If
Bar 120,150 To 126+(POS*5),170
End Proc
Procedure SETUP
Screen Open 1,640,256,4,Hires
Ink 2,
Box 120,150 To 520,170
End Proc